<?php

namespace App\Services;

use App\Models\AiLog;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Ninex\Lib\Http\Services\LibService;

class AiService extends LibService
{
    public function model(): Model
    {
        return app()->make(AiLog::class);
    }

    public function scopeQuery(Builder $query, array $conditions)
    {
        $user = auth()->guard('aiapp')->user();
        $query->where('app_id', $user->id);
    }

}
